using System;
using System.Data;
using System.Collections.Generic;
using ADOBase;
namespace eTMS.DAO{
	/********************************BEGIN LyLichSinhVienDAO****************************************/
	///<summary>
	/// <para>Author: Auto generated class by CSharp Code Generator v2.0</para>
	/// <para>Date:26/10/2011 34:05:09</para>
	/// <para>Class Name: LyLichSinhVienDAO</para>
	/// <para>Description: Class access to table LyLichSinhVien in database. Coder should'nt code here.</para>
	///</summary>

	
	public partial class LyLichSinhVienDAO : DAOBase<LyLichSinhVienEntity>{


		#region Select functions
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: CreateSelectOneCommand</para>
		/// <para>Input: SinhVien_ID</para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateSelectOneCommand(int SinhVien_ID){
			string strSQL="SELECT  [SinhVien_ID],[DoiTuongTS_ID],[DanToc_ID],[TonGiao_ID],[QuocGia_ID],[KhuVuc_ID],[TruongTuyenSinh],[XepLoaiPhoThong_ID],[DiaChiThuongTru],[DiaChiHienTai],[TinhThanh_ID],[QuanHuyen_ID],[MaNganhDuTuyen],[SoBaoDanh],[DiemDuTuyen],[DiemThuong],[Lop10],[Lop11],[Lop12],[NamTotNghiepPTTH],[KhenThuongKyLuat],[TomTatQuaTrinhHocTap],[NgayVaoDoan],[NoiVaoDoan],[NgayVaoDang],[NoiVaoDao],[BaoTin],[HoTenCha],[NgaySinhCha],[NgheNghiepCha],[HoTenMe],[NgaySinhMe],[NgheNghiepMe],[AnhChiEmRuot],[VoHoacChong] FROM [LyLichSinhVien]  WHERE [LyLichSinhVien].[SinhVien_ID]=@SinhVien_ID";
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			this.CreateCommandParameter(cmd,"@SinhVien_ID",SinhVien_ID);



			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: SelectOne</para>
		/// <para>Input: SinhVien_ID</para>
		/// <para>Output: LyLichSinhVienEntity</para>
		///</summary>
		public LyLichSinhVienEntity SelectOne(int SinhVien_ID){
			IDbCommand cmd=this.CreateSelectOneCommand(SinhVien_ID);
			return this.Select(cmd);
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: SelectOneByMaNganhDuTuyen</para>
		/// <para>Input: MaNganhDuTuyen</para>
		/// <para>Output: LyLichSinhVienEntity</para>
		///</summary>
		public LyLichSinhVienEntity SelectOneByMaNganhDuTuyen(string MaNganhDuTuyen){
			IDbCommand cmd=this.CreateSelectAllByKeyCommand("MaNganhDuTuyen",MaNganhDuTuyen);
			return this.Select(cmd);
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: CreateSelectAllCommand</para>
		/// <para>Input: </para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateSelectAllCommand(){
			string strSQL="SELECT  [SinhVien_ID],[DoiTuongTS_ID],[DanToc_ID],[TonGiao_ID],[QuocGia_ID],[KhuVuc_ID],[TruongTuyenSinh],[XepLoaiPhoThong_ID],[DiaChiThuongTru],[DiaChiHienTai],[TinhThanh_ID],[QuanHuyen_ID],[MaNganhDuTuyen],[SoBaoDanh],[DiemDuTuyen],[DiemThuong],[Lop10],[Lop11],[Lop12],[NamTotNghiepPTTH],[KhenThuongKyLuat],[TomTatQuaTrinhHocTap],[NgayVaoDoan],[NoiVaoDoan],[NgayVaoDang],[NoiVaoDao],[BaoTin],[HoTenCha],[NgaySinhCha],[NgheNghiepCha],[HoTenMe],[NgaySinhMe],[NgheNghiepMe],[AnhChiEmRuot],[VoHoacChong] FROM [LyLichSinhVien] ";
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: CreateSelectAllByKeyCommand</para>
		/// <para>Input: ColumnName,ColumnValue</para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateSelectAllByKeyCommand(string ColumnName,object Value){
			string strSQL="SELECT  [SinhVien_ID],[DoiTuongTS_ID],[DanToc_ID],[TonGiao_ID],[QuocGia_ID],[KhuVuc_ID],[TruongTuyenSinh],[XepLoaiPhoThong_ID],[DiaChiThuongTru],[DiaChiHienTai],[TinhThanh_ID],[QuanHuyen_ID],[MaNganhDuTuyen],[SoBaoDanh],[DiemDuTuyen],[DiemThuong],[Lop10],[Lop11],[Lop12],[NamTotNghiepPTTH],[KhenThuongKyLuat],[TomTatQuaTrinhHocTap],[NgayVaoDoan],[NoiVaoDoan],[NgayVaoDang],[NoiVaoDao],[BaoTin],[HoTenCha],[NgaySinhCha],[NgheNghiepCha],[HoTenMe],[NgaySinhMe],[NgheNghiepMe],[AnhChiEmRuot],[VoHoacChong] FROM [LyLichSinhVien]  WHERE [LyLichSinhVien].["+ColumnName+"]=@ColumnName";
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			this.CreateCommandParameter(cmd,"@ColumnName",Value);



			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: SelectAll</para>
		/// <para>Input: </para>
		/// <para>Output: List of LyLichSinhVienEntity</para>
		///</summary>
		public List<LyLichSinhVienEntity> SelectAll(){
			IDbCommand cmd=this.CreateSelectAllCommand();
			return this.SelectList(cmd);
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: SelectAllDS</para>
		/// <para>Input: </para>
		/// <para>Output: DataSet</para>
		///</summary>
		public DataSet SelectAllDS(){
			IDbCommand cmd=this.CreateSelectAllCommand();
			return this.SelectDS(cmd);
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: CreateSelectAllFilterCommand</para>
		/// <para>Input: </para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateSelectAllFilterCommand(string strFilter){
			string strSQL="SELECT  [SinhVien_ID],[DoiTuongTS_ID],[DanToc_ID],[TonGiao_ID],[QuocGia_ID],[KhuVuc_ID],[TruongTuyenSinh],[XepLoaiPhoThong_ID],[DiaChiThuongTru],[DiaChiHienTai],[TinhThanh_ID],[QuanHuyen_ID],[MaNganhDuTuyen],[SoBaoDanh],[DiemDuTuyen],[DiemThuong],[Lop10],[Lop11],[Lop12],[NamTotNghiepPTTH],[KhenThuongKyLuat],[TomTatQuaTrinhHocTap],[NgayVaoDoan],[NoiVaoDoan],[NgayVaoDang],[NoiVaoDao],[BaoTin],[HoTenCha],[NgaySinhCha],[NgheNghiepCha],[HoTenMe],[NgaySinhMe],[NgheNghiepMe],[AnhChiEmRuot],[VoHoacChong] FROM [LyLichSinhVien]  WHERE "+RemoveInjection(strFilter);
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: CreateSelectAllByKeyFilterCommand</para>
		/// <para>Input: ColumnName,ColumnValue</para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateSelectAllByKeyFilterCommand(string strFilter,string ColumnName,object Value){
			string strSQL="SELECT  [SinhVien_ID],[DoiTuongTS_ID],[DanToc_ID],[TonGiao_ID],[QuocGia_ID],[KhuVuc_ID],[TruongTuyenSinh],[XepLoaiPhoThong_ID],[DiaChiThuongTru],[DiaChiHienTai],[TinhThanh_ID],[QuanHuyen_ID],[MaNganhDuTuyen],[SoBaoDanh],[DiemDuTuyen],[DiemThuong],[Lop10],[Lop11],[Lop12],[NamTotNghiepPTTH],[KhenThuongKyLuat],[TomTatQuaTrinhHocTap],[NgayVaoDoan],[NoiVaoDoan],[NgayVaoDang],[NoiVaoDao],[BaoTin],[HoTenCha],[NgaySinhCha],[NgheNghiepCha],[HoTenMe],[NgaySinhMe],[NgheNghiepMe],[AnhChiEmRuot],[VoHoacChong] FROM [LyLichSinhVien]  WHERE [LyLichSinhVien].["+ColumnName+"]=@ColumnName AND "+RemoveInjection(strFilter);
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			this.CreateCommandParameter(cmd,"@ColumnName",Value);



			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: SelectAll</para>
		/// <para>Input: </para>
		/// <para>Output: List of LyLichSinhVienEntity</para>
		///</summary>
		public List<LyLichSinhVienEntity> SelectAllFilter(string strFilter){
			IDbCommand cmd=this.CreateSelectAllFilterCommand(strFilter);
			return this.SelectList(cmd);
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: SelectAllDSFilter</para>
		/// <para>Input: </para>
		/// <para>Output: DataSet</para>
		///</summary>
		public DataSet SelectAllDSFilter(string strFilter){
			IDbCommand cmd=this.CreateSelectAllFilterCommand(strFilter);
			return this.SelectDS(cmd);
		}
		#endregion

		#region Insert functions
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: CreateInsertCommand</para>
		/// <para>Input: LyLichSinhVienEntity</para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateInsertCommand(LyLichSinhVienEntity o){
			string strSQL="INSERT INTO [LyLichSinhVien]([SinhVien_ID],[DoiTuongTS_ID],[DanToc_ID],[TonGiao_ID],[QuocGia_ID],[KhuVuc_ID],[TruongTuyenSinh],[XepLoaiPhoThong_ID],[DiaChiThuongTru],[DiaChiHienTai],[TinhThanh_ID],[QuanHuyen_ID],[MaNganhDuTuyen],[SoBaoDanh],[DiemDuTuyen],[DiemThuong],[Lop10],[Lop11],[Lop12],[NamTotNghiepPTTH],[KhenThuongKyLuat],[TomTatQuaTrinhHocTap],[NgayVaoDoan],[NoiVaoDoan],[NgayVaoDang],[NoiVaoDao],[BaoTin],[HoTenCha],[NgaySinhCha],[NgheNghiepCha],[HoTenMe],[NgaySinhMe],[NgheNghiepMe],[AnhChiEmRuot],[VoHoacChong]) VALUES  (@SinhVien_ID,@DoiTuongTS_ID,@DanToc_ID,@TonGiao_ID,@QuocGia_ID,@KhuVuc_ID,@TruongTuyenSinh,@XepLoaiPhoThong_ID,@DiaChiThuongTru,@DiaChiHienTai,@TinhThanh_ID,@QuanHuyen_ID,@MaNganhDuTuyen,@SoBaoDanh,@DiemDuTuyen,@DiemThuong,@Lop10,@Lop11,@Lop12,@NamTotNghiepPTTH,@KhenThuongKyLuat,@TomTatQuaTrinhHocTap,@NgayVaoDoan,@NoiVaoDoan,@NgayVaoDang,@NoiVaoDao,@BaoTin,@HoTenCha,@NgaySinhCha,@NgheNghiepCha,@HoTenMe,@NgaySinhMe,@NgheNghiepMe,@AnhChiEmRuot,@VoHoacChong)";
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			if(o.IsNullSinhVien_ID)
				this.CreateCommandParameter(cmd,"@SinhVien_ID",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@SinhVien_ID",o.SinhVien_ID);

			if(o.IsNullDoiTuongTS_ID)
				this.CreateCommandParameter(cmd,"@DoiTuongTS_ID",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@DoiTuongTS_ID",o.DoiTuongTS_ID);

			if(o.IsNullDanToc_ID)
				this.CreateCommandParameter(cmd,"@DanToc_ID",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@DanToc_ID",o.DanToc_ID);

			if(o.IsNullTonGiao_ID)
				this.CreateCommandParameter(cmd,"@TonGiao_ID",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@TonGiao_ID",o.TonGiao_ID);

			if(o.IsNullQuocGia_ID)
				this.CreateCommandParameter(cmd,"@QuocGia_ID",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@QuocGia_ID",o.QuocGia_ID);

			if(o.IsNullKhuVuc_ID)
				this.CreateCommandParameter(cmd,"@KhuVuc_ID",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@KhuVuc_ID",o.KhuVuc_ID);

			if(o.IsNullTruongTuyenSinh)
				this.CreateCommandParameter(cmd,"@TruongTuyenSinh",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@TruongTuyenSinh",o.TruongTuyenSinh);

			if(o.IsNullXepLoaiPhoThong_ID)
				this.CreateCommandParameter(cmd,"@XepLoaiPhoThong_ID",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@XepLoaiPhoThong_ID",o.XepLoaiPhoThong_ID);

			if(o.IsNullDiaChiThuongTru)
				this.CreateCommandParameter(cmd,"@DiaChiThuongTru",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@DiaChiThuongTru",o.DiaChiThuongTru);

			if(o.IsNullDiaChiHienTai)
				this.CreateCommandParameter(cmd,"@DiaChiHienTai",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@DiaChiHienTai",o.DiaChiHienTai);

			if(o.IsNullTinhThanh_ID)
				this.CreateCommandParameter(cmd,"@TinhThanh_ID",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@TinhThanh_ID",o.TinhThanh_ID);

			if(o.IsNullQuanHuyen_ID)
				this.CreateCommandParameter(cmd,"@QuanHuyen_ID",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@QuanHuyen_ID",o.QuanHuyen_ID);

			if(o.IsNullMaNganhDuTuyen)
				this.CreateCommandParameter(cmd,"@MaNganhDuTuyen",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@MaNganhDuTuyen",o.MaNganhDuTuyen);

			if(o.IsNullSoBaoDanh)
				this.CreateCommandParameter(cmd,"@SoBaoDanh",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@SoBaoDanh",o.SoBaoDanh);

			if(o.IsNullDiemDuTuyen)
				this.CreateCommandParameter(cmd,"@DiemDuTuyen",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@DiemDuTuyen",o.DiemDuTuyen);

			if(o.IsNullDiemThuong)
				this.CreateCommandParameter(cmd,"@DiemThuong",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@DiemThuong",o.DiemThuong);

			if(o.IsNullLop10)
				this.CreateCommandParameter(cmd,"@Lop10",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@Lop10",o.Lop10);

			if(o.IsNullLop11)
				this.CreateCommandParameter(cmd,"@Lop11",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@Lop11",o.Lop11);

			if(o.IsNullLop12)
				this.CreateCommandParameter(cmd,"@Lop12",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@Lop12",o.Lop12);

			if(o.IsNullNamTotNghiepPTTH)
				this.CreateCommandParameter(cmd,"@NamTotNghiepPTTH",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@NamTotNghiepPTTH",o.NamTotNghiepPTTH);

			if(o.IsNullKhenThuongKyLuat)
				this.CreateCommandParameter(cmd,"@KhenThuongKyLuat",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@KhenThuongKyLuat",o.KhenThuongKyLuat);

			if(o.IsNullTomTatQuaTrinhHocTap)
				this.CreateCommandParameter(cmd,"@TomTatQuaTrinhHocTap",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@TomTatQuaTrinhHocTap",o.TomTatQuaTrinhHocTap);

			if(o.IsNullNgayVaoDoan)
				this.CreateCommandParameter(cmd,"@NgayVaoDoan",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@NgayVaoDoan",o.NgayVaoDoan);

			if(o.IsNullNoiVaoDoan)
				this.CreateCommandParameter(cmd,"@NoiVaoDoan",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@NoiVaoDoan",o.NoiVaoDoan);

			if(o.IsNullNgayVaoDang)
				this.CreateCommandParameter(cmd,"@NgayVaoDang",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@NgayVaoDang",o.NgayVaoDang);

			if(o.IsNullNoiVaoDao)
				this.CreateCommandParameter(cmd,"@NoiVaoDao",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@NoiVaoDao",o.NoiVaoDao);

			if(o.IsNullBaoTin)
				this.CreateCommandParameter(cmd,"@BaoTin",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@BaoTin",o.BaoTin);

			if(o.IsNullHoTenCha)
				this.CreateCommandParameter(cmd,"@HoTenCha",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@HoTenCha",o.HoTenCha);

			if(o.IsNullNgaySinhCha)
				this.CreateCommandParameter(cmd,"@NgaySinhCha",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@NgaySinhCha",o.NgaySinhCha);

			if(o.IsNullNgheNghiepCha)
				this.CreateCommandParameter(cmd,"@NgheNghiepCha",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@NgheNghiepCha",o.NgheNghiepCha);

			if(o.IsNullHoTenMe)
				this.CreateCommandParameter(cmd,"@HoTenMe",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@HoTenMe",o.HoTenMe);

			if(o.IsNullNgaySinhMe)
				this.CreateCommandParameter(cmd,"@NgaySinhMe",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@NgaySinhMe",o.NgaySinhMe);

			if(o.IsNullNgheNghiepMe)
				this.CreateCommandParameter(cmd,"@NgheNghiepMe",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@NgheNghiepMe",o.NgheNghiepMe);

			if(o.IsNullAnhChiEmRuot)
				this.CreateCommandParameter(cmd,"@AnhChiEmRuot",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@AnhChiEmRuot",o.AnhChiEmRuot);

			if(o.IsNullVoHoacChong)
				this.CreateCommandParameter(cmd,"@VoHoacChong",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@VoHoacChong",o.VoHoacChong);


			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: Save</para>
		/// <para>Input: LyLichSinhVienEntity</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool Save(LyLichSinhVienEntity o){
			IDbCommand cmd=this.CreateInsertCommand(o);
			bool result=false;
			result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: SaveList</para>
		/// <para>Input: List of LyLichSinhVienEntity</para>
		/// <para>Output: </para>
		///</summary>
		public void SaveList(List<LyLichSinhVienEntity>list){
			foreach(LyLichSinhVienEntity o in list){
				try{
					this.Save(o);
				}
				catch{
				}
			}
		}
		#endregion

		#region Update functions
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: CreateUpdateCommand</para>
		/// <para>Input: LyLichSinhVienEntity</para>
		/// <para>Output: </para>
		///</summary>
		protected IDbCommand CreateUpdateCommand(LyLichSinhVienEntity o){
			string strSQL="UPDATE  [LyLichSinhVien] SET [LyLichSinhVien].[SinhVien_ID]=@SinhVien_ID,[LyLichSinhVien].[DoiTuongTS_ID]=@DoiTuongTS_ID,[LyLichSinhVien].[DanToc_ID]=@DanToc_ID,[LyLichSinhVien].[TonGiao_ID]=@TonGiao_ID,[LyLichSinhVien].[QuocGia_ID]=@QuocGia_ID,[LyLichSinhVien].[KhuVuc_ID]=@KhuVuc_ID,[LyLichSinhVien].[TruongTuyenSinh]=@TruongTuyenSinh,[LyLichSinhVien].[XepLoaiPhoThong_ID]=@XepLoaiPhoThong_ID,[LyLichSinhVien].[DiaChiThuongTru]=@DiaChiThuongTru,[LyLichSinhVien].[DiaChiHienTai]=@DiaChiHienTai,[LyLichSinhVien].[TinhThanh_ID]=@TinhThanh_ID,[LyLichSinhVien].[QuanHuyen_ID]=@QuanHuyen_ID,[LyLichSinhVien].[MaNganhDuTuyen]=@MaNganhDuTuyen,[LyLichSinhVien].[SoBaoDanh]=@SoBaoDanh,[LyLichSinhVien].[DiemDuTuyen]=@DiemDuTuyen,[LyLichSinhVien].[DiemThuong]=@DiemThuong,[LyLichSinhVien].[Lop10]=@Lop10,[LyLichSinhVien].[Lop11]=@Lop11,[LyLichSinhVien].[Lop12]=@Lop12,[LyLichSinhVien].[NamTotNghiepPTTH]=@NamTotNghiepPTTH,[LyLichSinhVien].[KhenThuongKyLuat]=@KhenThuongKyLuat,[LyLichSinhVien].[TomTatQuaTrinhHocTap]=@TomTatQuaTrinhHocTap,[LyLichSinhVien].[NgayVaoDoan]=@NgayVaoDoan,[LyLichSinhVien].[NoiVaoDoan]=@NoiVaoDoan,[LyLichSinhVien].[NgayVaoDang]=@NgayVaoDang,[LyLichSinhVien].[NoiVaoDao]=@NoiVaoDao,[LyLichSinhVien].[BaoTin]=@BaoTin,[LyLichSinhVien].[HoTenCha]=@HoTenCha,[LyLichSinhVien].[NgaySinhCha]=@NgaySinhCha,[LyLichSinhVien].[NgheNghiepCha]=@NgheNghiepCha,[LyLichSinhVien].[HoTenMe]=@HoTenMe,[LyLichSinhVien].[NgaySinhMe]=@NgaySinhMe,[LyLichSinhVien].[NgheNghiepMe]=@NgheNghiepMe,[LyLichSinhVien].[AnhChiEmRuot]=@AnhChiEmRuot,[LyLichSinhVien].[VoHoacChong]=@VoHoacChong WHERE [LyLichSinhVien].[SinhVien_ID]=@OldSinhVien_ID";
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			if(o.IsNullSinhVien_ID)
				this.CreateCommandParameter(cmd,"@SinhVien_ID",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@SinhVien_ID",o.SinhVien_ID);

			if(o.IsNullDoiTuongTS_ID)
				this.CreateCommandParameter(cmd,"@DoiTuongTS_ID",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@DoiTuongTS_ID",o.DoiTuongTS_ID);

			if(o.IsNullDanToc_ID)
				this.CreateCommandParameter(cmd,"@DanToc_ID",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@DanToc_ID",o.DanToc_ID);

			if(o.IsNullTonGiao_ID)
				this.CreateCommandParameter(cmd,"@TonGiao_ID",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@TonGiao_ID",o.TonGiao_ID);

			if(o.IsNullQuocGia_ID)
				this.CreateCommandParameter(cmd,"@QuocGia_ID",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@QuocGia_ID",o.QuocGia_ID);

			if(o.IsNullKhuVuc_ID)
				this.CreateCommandParameter(cmd,"@KhuVuc_ID",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@KhuVuc_ID",o.KhuVuc_ID);

			if(o.IsNullTruongTuyenSinh)
				this.CreateCommandParameter(cmd,"@TruongTuyenSinh",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@TruongTuyenSinh",o.TruongTuyenSinh);

			if(o.IsNullXepLoaiPhoThong_ID)
				this.CreateCommandParameter(cmd,"@XepLoaiPhoThong_ID",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@XepLoaiPhoThong_ID",o.XepLoaiPhoThong_ID);

			if(o.IsNullDiaChiThuongTru)
				this.CreateCommandParameter(cmd,"@DiaChiThuongTru",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@DiaChiThuongTru",o.DiaChiThuongTru);

			if(o.IsNullDiaChiHienTai)
				this.CreateCommandParameter(cmd,"@DiaChiHienTai",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@DiaChiHienTai",o.DiaChiHienTai);

			if(o.IsNullTinhThanh_ID)
				this.CreateCommandParameter(cmd,"@TinhThanh_ID",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@TinhThanh_ID",o.TinhThanh_ID);

			if(o.IsNullQuanHuyen_ID)
				this.CreateCommandParameter(cmd,"@QuanHuyen_ID",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@QuanHuyen_ID",o.QuanHuyen_ID);

			if(o.IsNullMaNganhDuTuyen)
				this.CreateCommandParameter(cmd,"@MaNganhDuTuyen",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@MaNganhDuTuyen",o.MaNganhDuTuyen);

			if(o.IsNullSoBaoDanh)
				this.CreateCommandParameter(cmd,"@SoBaoDanh",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@SoBaoDanh",o.SoBaoDanh);

			if(o.IsNullDiemDuTuyen)
				this.CreateCommandParameter(cmd,"@DiemDuTuyen",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@DiemDuTuyen",o.DiemDuTuyen);

			if(o.IsNullDiemThuong)
				this.CreateCommandParameter(cmd,"@DiemThuong",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@DiemThuong",o.DiemThuong);

			if(o.IsNullLop10)
				this.CreateCommandParameter(cmd,"@Lop10",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@Lop10",o.Lop10);

			if(o.IsNullLop11)
				this.CreateCommandParameter(cmd,"@Lop11",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@Lop11",o.Lop11);

			if(o.IsNullLop12)
				this.CreateCommandParameter(cmd,"@Lop12",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@Lop12",o.Lop12);

			if(o.IsNullNamTotNghiepPTTH)
				this.CreateCommandParameter(cmd,"@NamTotNghiepPTTH",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@NamTotNghiepPTTH",o.NamTotNghiepPTTH);

			if(o.IsNullKhenThuongKyLuat)
				this.CreateCommandParameter(cmd,"@KhenThuongKyLuat",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@KhenThuongKyLuat",o.KhenThuongKyLuat);

			if(o.IsNullTomTatQuaTrinhHocTap)
				this.CreateCommandParameter(cmd,"@TomTatQuaTrinhHocTap",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@TomTatQuaTrinhHocTap",o.TomTatQuaTrinhHocTap);

			if(o.IsNullNgayVaoDoan)
				this.CreateCommandParameter(cmd,"@NgayVaoDoan",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@NgayVaoDoan",o.NgayVaoDoan);

			if(o.IsNullNoiVaoDoan)
				this.CreateCommandParameter(cmd,"@NoiVaoDoan",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@NoiVaoDoan",o.NoiVaoDoan);

			if(o.IsNullNgayVaoDang)
				this.CreateCommandParameter(cmd,"@NgayVaoDang",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@NgayVaoDang",o.NgayVaoDang);

			if(o.IsNullNoiVaoDao)
				this.CreateCommandParameter(cmd,"@NoiVaoDao",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@NoiVaoDao",o.NoiVaoDao);

			if(o.IsNullBaoTin)
				this.CreateCommandParameter(cmd,"@BaoTin",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@BaoTin",o.BaoTin);

			if(o.IsNullHoTenCha)
				this.CreateCommandParameter(cmd,"@HoTenCha",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@HoTenCha",o.HoTenCha);

			if(o.IsNullNgaySinhCha)
				this.CreateCommandParameter(cmd,"@NgaySinhCha",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@NgaySinhCha",o.NgaySinhCha);

			if(o.IsNullNgheNghiepCha)
				this.CreateCommandParameter(cmd,"@NgheNghiepCha",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@NgheNghiepCha",o.NgheNghiepCha);

			if(o.IsNullHoTenMe)
				this.CreateCommandParameter(cmd,"@HoTenMe",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@HoTenMe",o.HoTenMe);

			if(o.IsNullNgaySinhMe)
				this.CreateCommandParameter(cmd,"@NgaySinhMe",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@NgaySinhMe",o.NgaySinhMe);

			if(o.IsNullNgheNghiepMe)
				this.CreateCommandParameter(cmd,"@NgheNghiepMe",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@NgheNghiepMe",o.NgheNghiepMe);

			if(o.IsNullAnhChiEmRuot)
				this.CreateCommandParameter(cmd,"@AnhChiEmRuot",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@AnhChiEmRuot",o.AnhChiEmRuot);

			if(o.IsNullVoHoacChong)
				this.CreateCommandParameter(cmd,"@VoHoacChong",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@VoHoacChong",o.VoHoacChong);

			if(o.IsNullOldSinhVien_ID)
				this.CreateCommandParameter(cmd,"@OldSinhVien_ID",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@OldSinhVien_ID",o.OldSinhVien_ID);


			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: CreateUpdateFieldCommand</para>
		/// <para>Input: ColumnName,ColumnValue,SinhVien_ID</para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateUpdateFieldCommand(string ColumnName,object Value,int SinhVien_ID){
			string strSQL="UPDATE  [LyLichSinhVien] SET [LyLichSinhVien].["+ColumnName+"]=@ColumnName WHERE [LyLichSinhVien].[SinhVien_ID]=@SinhVien_ID";
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			this.CreateCommandParameter(cmd,"@SinhVien_ID",SinhVien_ID);



			this.CreateCommandParameter(cmd,"@ColumnName",Value);


			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: Update</para>
		/// <para>Input: LyLichSinhVienEntity</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool Update(LyLichSinhVienEntity o){
			IDbCommand cmd=this.CreateUpdateCommand(o);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: UpdateList</para>
		/// <para>Input: List of LyLichSinhVienEntity</para>
		/// <para>Output: </para>
		///</summary>
		public void UpdateList(List<LyLichSinhVienEntity>list){
			foreach(LyLichSinhVienEntity o in list){
				try{
					this.Update(o);
				}
				catch{
				}
			}
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: UpdateSinhVien_ID</para>
		/// <para>Input: NewSinhVien_ID,SinhVien_ID</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool UpdateSinhVien_ID(int NewSinhVien_ID,int SinhVien_ID){
			IDbCommand cmd=this.CreateUpdateFieldCommand("SinhVien_ID",NewSinhVien_ID,SinhVien_ID);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: UpdateDoiTuongTS_ID</para>
		/// <para>Input: NewDoiTuongTS_ID,SinhVien_ID</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool UpdateDoiTuongTS_ID(int NewDoiTuongTS_ID,int SinhVien_ID){
			IDbCommand cmd=this.CreateUpdateFieldCommand("DoiTuongTS_ID",NewDoiTuongTS_ID,SinhVien_ID);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: UpdateDanToc_ID</para>
		/// <para>Input: NewDanToc_ID,SinhVien_ID</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool UpdateDanToc_ID(int NewDanToc_ID,int SinhVien_ID){
			IDbCommand cmd=this.CreateUpdateFieldCommand("DanToc_ID",NewDanToc_ID,SinhVien_ID);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: UpdateTonGiao_ID</para>
		/// <para>Input: NewTonGiao_ID,SinhVien_ID</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool UpdateTonGiao_ID(int NewTonGiao_ID,int SinhVien_ID){
			IDbCommand cmd=this.CreateUpdateFieldCommand("TonGiao_ID",NewTonGiao_ID,SinhVien_ID);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: UpdateQuocGia_ID</para>
		/// <para>Input: NewQuocGia_ID,SinhVien_ID</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool UpdateQuocGia_ID(int NewQuocGia_ID,int SinhVien_ID){
			IDbCommand cmd=this.CreateUpdateFieldCommand("QuocGia_ID",NewQuocGia_ID,SinhVien_ID);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: UpdateKhuVuc_ID</para>
		/// <para>Input: NewKhuVuc_ID,SinhVien_ID</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool UpdateKhuVuc_ID(int NewKhuVuc_ID,int SinhVien_ID){
			IDbCommand cmd=this.CreateUpdateFieldCommand("KhuVuc_ID",NewKhuVuc_ID,SinhVien_ID);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: UpdateTruongTuyenSinh</para>
		/// <para>Input: NewTruongTuyenSinh,SinhVien_ID</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool UpdateTruongTuyenSinh(string NewTruongTuyenSinh,int SinhVien_ID){
			IDbCommand cmd=this.CreateUpdateFieldCommand("TruongTuyenSinh",NewTruongTuyenSinh,SinhVien_ID);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: UpdateXepLoaiPhoThong_ID</para>
		/// <para>Input: NewXepLoaiPhoThong_ID,SinhVien_ID</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool UpdateXepLoaiPhoThong_ID(int NewXepLoaiPhoThong_ID,int SinhVien_ID){
			IDbCommand cmd=this.CreateUpdateFieldCommand("XepLoaiPhoThong_ID",NewXepLoaiPhoThong_ID,SinhVien_ID);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: UpdateDiaChiThuongTru</para>
		/// <para>Input: NewDiaChiThuongTru,SinhVien_ID</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool UpdateDiaChiThuongTru(string NewDiaChiThuongTru,int SinhVien_ID){
			IDbCommand cmd=this.CreateUpdateFieldCommand("DiaChiThuongTru",NewDiaChiThuongTru,SinhVien_ID);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: UpdateDiaChiHienTai</para>
		/// <para>Input: NewDiaChiHienTai,SinhVien_ID</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool UpdateDiaChiHienTai(string NewDiaChiHienTai,int SinhVien_ID){
			IDbCommand cmd=this.CreateUpdateFieldCommand("DiaChiHienTai",NewDiaChiHienTai,SinhVien_ID);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: UpdateTinhThanh_ID</para>
		/// <para>Input: NewTinhThanh_ID,SinhVien_ID</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool UpdateTinhThanh_ID(int NewTinhThanh_ID,int SinhVien_ID){
			IDbCommand cmd=this.CreateUpdateFieldCommand("TinhThanh_ID",NewTinhThanh_ID,SinhVien_ID);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: UpdateQuanHuyen_ID</para>
		/// <para>Input: NewQuanHuyen_ID,SinhVien_ID</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool UpdateQuanHuyen_ID(int NewQuanHuyen_ID,int SinhVien_ID){
			IDbCommand cmd=this.CreateUpdateFieldCommand("QuanHuyen_ID",NewQuanHuyen_ID,SinhVien_ID);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: UpdateMaNganhDuTuyen</para>
		/// <para>Input: NewMaNganhDuTuyen,SinhVien_ID</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool UpdateMaNganhDuTuyen(string NewMaNganhDuTuyen,int SinhVien_ID){
			IDbCommand cmd=this.CreateUpdateFieldCommand("MaNganhDuTuyen",NewMaNganhDuTuyen,SinhVien_ID);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: UpdateSoBaoDanh</para>
		/// <para>Input: NewSoBaoDanh,SinhVien_ID</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool UpdateSoBaoDanh(string NewSoBaoDanh,int SinhVien_ID){
			IDbCommand cmd=this.CreateUpdateFieldCommand("SoBaoDanh",NewSoBaoDanh,SinhVien_ID);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: UpdateDiemDuTuyen</para>
		/// <para>Input: NewDiemDuTuyen,SinhVien_ID</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool UpdateDiemDuTuyen(Decimal NewDiemDuTuyen,int SinhVien_ID){
			IDbCommand cmd=this.CreateUpdateFieldCommand("DiemDuTuyen",NewDiemDuTuyen,SinhVien_ID);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: UpdateDiemThuong</para>
		/// <para>Input: NewDiemThuong,SinhVien_ID</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool UpdateDiemThuong(Decimal NewDiemThuong,int SinhVien_ID){
			IDbCommand cmd=this.CreateUpdateFieldCommand("DiemThuong",NewDiemThuong,SinhVien_ID);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: UpdateLop10</para>
		/// <para>Input: NewLop10,SinhVien_ID</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool UpdateLop10(string NewLop10,int SinhVien_ID){
			IDbCommand cmd=this.CreateUpdateFieldCommand("Lop10",NewLop10,SinhVien_ID);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: UpdateLop11</para>
		/// <para>Input: NewLop11,SinhVien_ID</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool UpdateLop11(string NewLop11,int SinhVien_ID){
			IDbCommand cmd=this.CreateUpdateFieldCommand("Lop11",NewLop11,SinhVien_ID);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: UpdateLop12</para>
		/// <para>Input: NewLop12,SinhVien_ID</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool UpdateLop12(string NewLop12,int SinhVien_ID){
			IDbCommand cmd=this.CreateUpdateFieldCommand("Lop12",NewLop12,SinhVien_ID);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: UpdateNamTotNghiepPTTH</para>
		/// <para>Input: NewNamTotNghiepPTTH,SinhVien_ID</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool UpdateNamTotNghiepPTTH(int NewNamTotNghiepPTTH,int SinhVien_ID){
			IDbCommand cmd=this.CreateUpdateFieldCommand("NamTotNghiepPTTH",NewNamTotNghiepPTTH,SinhVien_ID);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: UpdateKhenThuongKyLuat</para>
		/// <para>Input: NewKhenThuongKyLuat,SinhVien_ID</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool UpdateKhenThuongKyLuat(string NewKhenThuongKyLuat,int SinhVien_ID){
			IDbCommand cmd=this.CreateUpdateFieldCommand("KhenThuongKyLuat",NewKhenThuongKyLuat,SinhVien_ID);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: UpdateTomTatQuaTrinhHocTap</para>
		/// <para>Input: NewTomTatQuaTrinhHocTap,SinhVien_ID</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool UpdateTomTatQuaTrinhHocTap(string NewTomTatQuaTrinhHocTap,int SinhVien_ID){
			IDbCommand cmd=this.CreateUpdateFieldCommand("TomTatQuaTrinhHocTap",NewTomTatQuaTrinhHocTap,SinhVien_ID);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: UpdateNgayVaoDoan</para>
		/// <para>Input: NewNgayVaoDoan,SinhVien_ID</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool UpdateNgayVaoDoan(string NewNgayVaoDoan,int SinhVien_ID){
			IDbCommand cmd=this.CreateUpdateFieldCommand("NgayVaoDoan",NewNgayVaoDoan,SinhVien_ID);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: UpdateNoiVaoDoan</para>
		/// <para>Input: NewNoiVaoDoan,SinhVien_ID</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool UpdateNoiVaoDoan(string NewNoiVaoDoan,int SinhVien_ID){
			IDbCommand cmd=this.CreateUpdateFieldCommand("NoiVaoDoan",NewNoiVaoDoan,SinhVien_ID);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: UpdateNgayVaoDang</para>
		/// <para>Input: NewNgayVaoDang,SinhVien_ID</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool UpdateNgayVaoDang(string NewNgayVaoDang,int SinhVien_ID){
			IDbCommand cmd=this.CreateUpdateFieldCommand("NgayVaoDang",NewNgayVaoDang,SinhVien_ID);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: UpdateNoiVaoDao</para>
		/// <para>Input: NewNoiVaoDao,SinhVien_ID</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool UpdateNoiVaoDao(string NewNoiVaoDao,int SinhVien_ID){
			IDbCommand cmd=this.CreateUpdateFieldCommand("NoiVaoDao",NewNoiVaoDao,SinhVien_ID);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: UpdateBaoTin</para>
		/// <para>Input: NewBaoTin,SinhVien_ID</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool UpdateBaoTin(string NewBaoTin,int SinhVien_ID){
			IDbCommand cmd=this.CreateUpdateFieldCommand("BaoTin",NewBaoTin,SinhVien_ID);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: UpdateHoTenCha</para>
		/// <para>Input: NewHoTenCha,SinhVien_ID</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool UpdateHoTenCha(string NewHoTenCha,int SinhVien_ID){
			IDbCommand cmd=this.CreateUpdateFieldCommand("HoTenCha",NewHoTenCha,SinhVien_ID);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: UpdateNgaySinhCha</para>
		/// <para>Input: NewNgaySinhCha,SinhVien_ID</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool UpdateNgaySinhCha(string NewNgaySinhCha,int SinhVien_ID){
			IDbCommand cmd=this.CreateUpdateFieldCommand("NgaySinhCha",NewNgaySinhCha,SinhVien_ID);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: UpdateNgheNghiepCha</para>
		/// <para>Input: NewNgheNghiepCha,SinhVien_ID</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool UpdateNgheNghiepCha(string NewNgheNghiepCha,int SinhVien_ID){
			IDbCommand cmd=this.CreateUpdateFieldCommand("NgheNghiepCha",NewNgheNghiepCha,SinhVien_ID);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: UpdateHoTenMe</para>
		/// <para>Input: NewHoTenMe,SinhVien_ID</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool UpdateHoTenMe(string NewHoTenMe,int SinhVien_ID){
			IDbCommand cmd=this.CreateUpdateFieldCommand("HoTenMe",NewHoTenMe,SinhVien_ID);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: UpdateNgaySinhMe</para>
		/// <para>Input: NewNgaySinhMe,SinhVien_ID</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool UpdateNgaySinhMe(string NewNgaySinhMe,int SinhVien_ID){
			IDbCommand cmd=this.CreateUpdateFieldCommand("NgaySinhMe",NewNgaySinhMe,SinhVien_ID);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: UpdateNgheNghiepMe</para>
		/// <para>Input: NewNgheNghiepMe,SinhVien_ID</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool UpdateNgheNghiepMe(string NewNgheNghiepMe,int SinhVien_ID){
			IDbCommand cmd=this.CreateUpdateFieldCommand("NgheNghiepMe",NewNgheNghiepMe,SinhVien_ID);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: UpdateAnhChiEmRuot</para>
		/// <para>Input: NewAnhChiEmRuot,SinhVien_ID</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool UpdateAnhChiEmRuot(string NewAnhChiEmRuot,int SinhVien_ID){
			IDbCommand cmd=this.CreateUpdateFieldCommand("AnhChiEmRuot",NewAnhChiEmRuot,SinhVien_ID);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: UpdateVoHoacChong</para>
		/// <para>Input: NewVoHoacChong,SinhVien_ID</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool UpdateVoHoacChong(string NewVoHoacChong,int SinhVien_ID){
			IDbCommand cmd=this.CreateUpdateFieldCommand("VoHoacChong",NewVoHoacChong,SinhVien_ID);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		#endregion

		#region Delete functions
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: DeleteAllCommand</para>
		/// <para>Input: </para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateDeleteAllCommand(){
			string strSQL="DELETE   FROM [LyLichSinhVien]  ";
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: DeleteCommand</para>
		/// <para>Input: LyLichSinhVienEntity</para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateDeleteCommand(LyLichSinhVienEntity o){
			string strSQL="DELETE   FROM [LyLichSinhVien]   WHERE [LyLichSinhVien].[SinhVien_ID]=@SinhVien_ID";
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			if(o.IsNullSinhVien_ID)
				this.CreateCommandParameter(cmd,"@SinhVien_ID",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@SinhVien_ID",o.SinhVien_ID);


			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: DeleteAll</para>
		/// <para>Input: </para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool DeleteAll(){
			IDbCommand cmd=this.CreateDeleteAllCommand();
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: CreateDeleteByPrimaryKeyCommand</para>
		/// <para>Input: SinhVien_ID</para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateDeleteByPrimaryKeyCommand(int SinhVien_ID){
			string strSQL="DELETE   FROM [LyLichSinhVien]   WHERE [LyLichSinhVien].[SinhVien_ID]=@SinhVien_ID";
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			this.CreateCommandParameter(cmd,"@SinhVien_ID",SinhVien_ID);



			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: CreateDeleteByKeyCommand</para>
		/// <para>Input: ColumnName , ColumnValue</para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateDeleteByKeyCommand(string ColumnName,object Value){
			string strSQL="DELETE   FROM [LyLichSinhVien]   WHERE [LyLichSinhVien].["+ColumnName+"]=@ColumnName";
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			this.CreateCommandParameter(cmd,"@ColumnName",Value);



			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: Delete</para>
		/// <para>Input: LyLichSinhVienEntity</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool Delete(LyLichSinhVienEntity o){
			IDbCommand cmd=this.CreateDeleteCommand(o);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: DeleteByID</para>
		/// <para>Input: SinhVien_ID</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool DeleteByID(int SinhVien_ID){
			IDbCommand cmd=this.CreateDeleteByPrimaryKeyCommand(SinhVien_ID);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		#endregion

		#region Select join to DanTocDoiTuongTSKhuVucQuanHuyenQuocGiaSinhVienTinhThanhTonGiaoXepLoaiPhoThong functions
		#endregion

		#region Select join to DanToc functions
		#endregion

		#region Select join to DoiTuongTS functions
		#endregion

		#region Select join to KhuVuc functions
		#endregion

		#region Select join to QuanHuyen functions
		#endregion

		#region Select join to QuocGia functions
		#endregion

		#region Select join to SinhVien functions
		#endregion

		#region Select join to TinhThanh functions
		#endregion

		#region Select join to TonGiao functions
		#endregion

		#region Select join to XepLoaiPhoThong functions
		#endregion

		#region Select,delete by SinhVien_ID functions
		#endregion

		#region Select,delete by DoiTuongTS_ID functions
		#endregion

		#region Select,delete by DanToc_ID functions
		#endregion

		#region Select,delete by TonGiao_ID functions
		#endregion

		#region Select,delete by QuocGia_ID functions
		#endregion

		#region Select,delete by KhuVuc_ID functions
		#endregion

		#region Select,delete by XepLoaiPhoThong_ID functions
		#endregion

		#region Select,delete by TinhThanh_ID functions
		#endregion

		#region Select,delete by QuanHuyen_ID functions
		#endregion

		#region MapObject functions
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: MapObject</para>
		/// <para>Input: IDataReader</para>
		/// <para>Output: LyLichSinhVienEntity</para>
		///</summary>
		protected override LyLichSinhVienEntity MapObject(IDataReader r){
			LyLichSinhVienEntity entity = new LyLichSinhVienEntity();
			try{
				if(r.FieldCount>0){
					try
					{
						int ordinal = r.GetOrdinal("SinhVien_ID");
						if (!r.IsDBNull(ordinal)) entity.SinhVien_ID = ((int)(r.GetValue(ordinal)));
						entity.OldSinhVien_ID=entity.SinhVien_ID;
					}
					catch{}
					try
					{
						int ordinal = r.GetOrdinal("DoiTuongTS_ID");
						if (!r.IsDBNull(ordinal)) entity.DoiTuongTS_ID = ((int)(r.GetValue(ordinal)));
					}
					catch{}
					try
					{
						int ordinal = r.GetOrdinal("DanToc_ID");
						if (!r.IsDBNull(ordinal)) entity.DanToc_ID = ((int)(r.GetValue(ordinal)));
					}
					catch{}
					try
					{
						int ordinal = r.GetOrdinal("TonGiao_ID");
						if (!r.IsDBNull(ordinal)) entity.TonGiao_ID = ((int)(r.GetValue(ordinal)));
					}
					catch{}
					try
					{
						int ordinal = r.GetOrdinal("QuocGia_ID");
						if (!r.IsDBNull(ordinal)) entity.QuocGia_ID = ((int)(r.GetValue(ordinal)));
					}
					catch{}
					try
					{
						int ordinal = r.GetOrdinal("KhuVuc_ID");
						if (!r.IsDBNull(ordinal)) entity.KhuVuc_ID = ((int)(r.GetValue(ordinal)));
					}
					catch{}
					try
					{
						int ordinal = r.GetOrdinal("TruongTuyenSinh");
						if (!r.IsDBNull(ordinal)) entity.TruongTuyenSinh = ((string)(r.GetValue(ordinal)));
					}
					catch{}
					try
					{
						int ordinal = r.GetOrdinal("XepLoaiPhoThong_ID");
						if (!r.IsDBNull(ordinal)) entity.XepLoaiPhoThong_ID = ((int)(r.GetValue(ordinal)));
					}
					catch{}
					try
					{
						int ordinal = r.GetOrdinal("DiaChiThuongTru");
						if (!r.IsDBNull(ordinal)) entity.DiaChiThuongTru = ((string)(r.GetValue(ordinal)));
					}
					catch{}
					try
					{
						int ordinal = r.GetOrdinal("DiaChiHienTai");
						if (!r.IsDBNull(ordinal)) entity.DiaChiHienTai = ((string)(r.GetValue(ordinal)));
					}
					catch{}
					try
					{
						int ordinal = r.GetOrdinal("TinhThanh_ID");
						if (!r.IsDBNull(ordinal)) entity.TinhThanh_ID = ((int)(r.GetValue(ordinal)));
					}
					catch{}
					try
					{
						int ordinal = r.GetOrdinal("QuanHuyen_ID");
						if (!r.IsDBNull(ordinal)) entity.QuanHuyen_ID = ((int)(r.GetValue(ordinal)));
					}
					catch{}
					try
					{
						int ordinal = r.GetOrdinal("MaNganhDuTuyen");
						if (!r.IsDBNull(ordinal)) entity.MaNganhDuTuyen = ((string)(r.GetValue(ordinal)));
					}
					catch{}
					try
					{
						int ordinal = r.GetOrdinal("SoBaoDanh");
						if (!r.IsDBNull(ordinal)) entity.SoBaoDanh = ((string)(r.GetValue(ordinal)));
					}
					catch{}
					try
					{
						int ordinal = r.GetOrdinal("DiemDuTuyen");
						if (!r.IsDBNull(ordinal)) entity.DiemDuTuyen = (Convert.ToDecimal(r.GetValue(ordinal)));
					}
					catch{}
					try
					{
						int ordinal = r.GetOrdinal("DiemThuong");
						if (!r.IsDBNull(ordinal)) entity.DiemThuong = (Convert.ToDecimal(r.GetValue(ordinal)));
					}
					catch{}
					try
					{
						int ordinal = r.GetOrdinal("Lop10");
						if (!r.IsDBNull(ordinal)) entity.Lop10 = ((string)(r.GetValue(ordinal)));
					}
					catch{}
					try
					{
						int ordinal = r.GetOrdinal("Lop11");
						if (!r.IsDBNull(ordinal)) entity.Lop11 = ((string)(r.GetValue(ordinal)));
					}
					catch{}
					try
					{
						int ordinal = r.GetOrdinal("Lop12");
						if (!r.IsDBNull(ordinal)) entity.Lop12 = ((string)(r.GetValue(ordinal)));
					}
					catch{}
					try
					{
						int ordinal = r.GetOrdinal("NamTotNghiepPTTH");
						if (!r.IsDBNull(ordinal)) entity.NamTotNghiepPTTH = ((int)(r.GetValue(ordinal)));
					}
					catch{}
					try
					{
						int ordinal = r.GetOrdinal("KhenThuongKyLuat");
						if (!r.IsDBNull(ordinal)) entity.KhenThuongKyLuat = ((string)(r.GetValue(ordinal)));
					}
					catch{}
					try
					{
						int ordinal = r.GetOrdinal("TomTatQuaTrinhHocTap");
						if (!r.IsDBNull(ordinal)) entity.TomTatQuaTrinhHocTap = ((string)(r.GetValue(ordinal)));
					}
					catch{}
					try
					{
						int ordinal = r.GetOrdinal("NgayVaoDoan");
						if (!r.IsDBNull(ordinal)) entity.NgayVaoDoan = ((string)(r.GetValue(ordinal)));
					}
					catch{}
					try
					{
						int ordinal = r.GetOrdinal("NoiVaoDoan");
						if (!r.IsDBNull(ordinal)) entity.NoiVaoDoan = ((string)(r.GetValue(ordinal)));
					}
					catch{}
					try
					{
						int ordinal = r.GetOrdinal("NgayVaoDang");
						if (!r.IsDBNull(ordinal)) entity.NgayVaoDang = ((string)(r.GetValue(ordinal)));
					}
					catch{}
					try
					{
						int ordinal = r.GetOrdinal("NoiVaoDao");
						if (!r.IsDBNull(ordinal)) entity.NoiVaoDao = ((string)(r.GetValue(ordinal)));
					}
					catch{}
					try
					{
						int ordinal = r.GetOrdinal("BaoTin");
						if (!r.IsDBNull(ordinal)) entity.BaoTin = ((string)(r.GetValue(ordinal)));
					}
					catch{}
					try
					{
						int ordinal = r.GetOrdinal("HoTenCha");
						if (!r.IsDBNull(ordinal)) entity.HoTenCha = ((string)(r.GetValue(ordinal)));
					}
					catch{}
					try
					{
						int ordinal = r.GetOrdinal("NgaySinhCha");
						if (!r.IsDBNull(ordinal)) entity.NgaySinhCha = ((string)(r.GetValue(ordinal)));
					}
					catch{}
					try
					{
						int ordinal = r.GetOrdinal("NgheNghiepCha");
						if (!r.IsDBNull(ordinal)) entity.NgheNghiepCha = ((string)(r.GetValue(ordinal)));
					}
					catch{}
					try
					{
						int ordinal = r.GetOrdinal("HoTenMe");
						if (!r.IsDBNull(ordinal)) entity.HoTenMe = ((string)(r.GetValue(ordinal)));
					}
					catch{}
					try
					{
						int ordinal = r.GetOrdinal("NgaySinhMe");
						if (!r.IsDBNull(ordinal)) entity.NgaySinhMe = ((string)(r.GetValue(ordinal)));
					}
					catch{}
					try
					{
						int ordinal = r.GetOrdinal("NgheNghiepMe");
						if (!r.IsDBNull(ordinal)) entity.NgheNghiepMe = ((string)(r.GetValue(ordinal)));
					}
					catch{}
					try
					{
						int ordinal = r.GetOrdinal("AnhChiEmRuot");
						if (!r.IsDBNull(ordinal)) entity.AnhChiEmRuot = ((string)(r.GetValue(ordinal)));
					}
					catch{}
					try
					{
						int ordinal = r.GetOrdinal("VoHoacChong");
						if (!r.IsDBNull(ordinal)) entity.VoHoacChong = ((string)(r.GetValue(ordinal)));
					}
					catch{}
					return entity;
				}
			}catch{}
			return null;
		}
		#endregion
	}
	/*****************************************************************************************************/
	/**********************************END LyLichSinhVienDAOBase*****************************************/
	/*****************************************************************************************************/
}

